import React from 'react'
// ===================================================================== Declare
const { $fn, $Lazy } = window
// ===================================================================== Lazy
const Menu = $Lazy.load(()=>import('#frame/menu'))
// ===================================================================== 标本管理
class Index extends React.Component{
	state = {
		data:[]
	}
	
	menuData = $fn.local('menu').filter(v=>v.menu_en === 'xgxt')
	newSkip = $fn.hasArray(this.menuData[0]?.children[0]?.children) ? this.menuData[0]?.children[0]?.children[0].path : this.menuData[0]?.children[0].path
	skip = { to: this.newSkip.slice(1) }
	
	child = [
		// 标本信息
		{
			id: 'xgjcxx', 
			parent: '/novel-coro-system/test-info/specimen',
			children: [
				{ title: '添加样本信息', 	path: 'project-enter',	cache:true },
			]
		},
		// 报告单管理
		{
			id: 'xgjcxx', 
			parent: '/novel-coro-system/test-info/report-manage',
			children: [
				{ title: '预览报告单', 	path: 'preview-report', component:'novel-coro-system/test-info/cpt/preview-report', cache:true }
			]
		}
	]
	
	componentDidMount(){
		$fn.getMenu.call(this, 'xgxt', this.child)
	}
	
	render(){
		return <Menu data={this.state.data} skip={ this.skip } />
	}
}

export default Index